package com.levenx.service.support;

import com.levenx.constant.ResultStatus;
import com.levenx.service.CommonService;
import com.levenx.vo.CommonSearch;
import com.levenx.vo.Result;
import org.springframework.stereotype.Service;

import java.util.Collection;

/**
 * 默认的实现类
 */
@Service("defaultService")
public class DefaultCommonServiceImpl implements CommonService<Object> {

    private final int status = ResultStatus.NO_SERVICE;

    private final String massage = "NO_SERVICE";

    @Override
    public Result create(Object t) {
        return Result.newResult().ofStatus(status,massage);
    }

    @Override
    public Result update(Object t) {
        return Result.newResult().ofStatus(status,massage);
    }

    @Override
    public Result search(Object param, int pn, int ps) {
        return null;
    }

    @Override
    public Result delete(Collection<Object> id) {
        return Result.newResult().ofStatus(status,massage);
    }

    @Override
    public Result only(Object param) {
        return null;
    }
}
